﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using smartphone.App_Code;

namespace smartphone.UserControls
{
    public partial class AdminAddNews : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void BtEditNews_Click(object sender, EventArgs e)
        {
            News news = new News();

            string title = TxtTitle.Text;
            string content = EditorContent.Content;

            bool success = news.CreateNews(title, content);

            Response.Redirect("AdminNews.aspx");
        }

        protected void BtEditNewsCancel_Click(object sender, EventArgs e)
        {
            Response.Redirect("AdminNews.aspx");
        }
    }
}